window.onload = function () {

    var btn = document.getElementById('btn')
    btn.onclick = function () {
        var tel = document.getElementById('tel').value
        var score = document.getElementById('score').value
        var psd = document.getElementById('psd').value
        var psd1 = document.getElementById('psd1').value
        var telt = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
        if (telt.test(tel)) {
            if (score == '7364') {
                if (psd == '') {
                    alert('密码不能为空!')
                } else {
                    if (psd == psd1) {
                        window.location = 'z-success.html'
                    } else {
                        alert('输入密码不一致!')
                    }
                }
            } else {
                alert('验证码不正确!')
            }
        } else {
            alert('请输入正确的手机号!')
        }
    }
}